<?php
if(!interface_exists('XView', false)){
	require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'XView.php');
}
abstract class XAbstractView extends XObject implements XView{
	protected $controller = null;
	protected $contents = array();
	protected $route = null;
	protected $name = null;
	protected $extesion = null;
		
	/**
	 * @return XAbstractView
	 */	
	public function setController(XController $controller){
		$this->controller = $controller;
		return $this;
	}

	/**
	 * @return XAbstractView
	 */	
	public function setRoute($route){
		$this->route = $route;
		return $this;
	}
	
	/**
	 * @return XAbstractView
	 */	
	public function setName($name){
		$this->name = $name;
		return $this;
	}
	
	/**
	 * @return XAbstractView
	 */	
	public function set($key, $value){
		$this->contents[$key] = $value;
		return $this;
	}
	
	/**
	 * @return XAbstractView
	 */	
	public function setAll(array $array){
		foreach($array as $key => $value){
			$this->set($key, $value);
		}
		return $this;
	}
	
	public function view(){
		
	}
}
?>